package com.cloudy.ec2.request;

public class ModifyImageAttribute extends EC2Request {
	enum OperationType{
		ADD("add"),
		REMOVE("remove");
		private final String value;
		OperationType(String value){
			this.value = value;
		}
		@Override
		public String toString() {
			return value;
		}
	}

	public ModifyImageAttribute(String imageId, OperationType operationType, String[] userIds, String[] userGroups) {
		putAttribute("ImageId", imageId);
		putAttribute("Attribute", "launchPermission");
		putAttribute("OperationType", operationType.toString());
		addAttributes("UserGroup", userGroups);
		addAttributes("UserId", userIds);
	}
	public ModifyImageAttribute(String imageId,String[] productCode) {
		putAttribute("ImageId", imageId);
		putAttribute("Attribute", "productCodes");
		addAttributes("ProductCode", productCode);
	}
}
